import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'

export default defineUniPages({
  globalStyle: {
    navigationStyle: 'default',
    navigationBarTitleText: 'unibest',
    navigationBarBackgroundColor: '#f8f8f8',
    navigationBarTextStyle: 'black',
    backgroundColor: '#FFFFFF',
  },
  easycom: {
    autoscan: true,
    custom: {
      '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
      '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
        'z-paging/components/z-paging$1/z-paging$1.vue',
    },
  },

  // 自定义底部菜单
  tabBar: {
    custom: true,
    color: '#999999',
    selectedColor: '#018d71',
    backgroundColor: '#F8F8F8',
    borderStyle: 'black',
    height: '50px',
    fontSize: '10px',
    iconWidth: '24px',
    spacing: '3px',
    list: [
      // 注意tabbar路由需要使用 layout:tabbar 布局
      {
        iconType: 'local',
        iconPath: '/static/tabbar/home.png',
        selectedIconPath: '/static/tabbar/home_active.png',
        pagePath: 'pages/index/index',
        text: '首页',
      },
      {
        iconType: 'local',
        iconPath: '/static/tabbar/category.png',
        selectedIconPath: '/static/tabbar/category_active.png',
        pagePath: 'pages/sort/index',
        text: '分类',
      },
      {
        iconType: 'local',
        iconPath: '/static/tabbar/live.png',
        iconWidth: '80rpx',
        iconHeight: '80rpx',
        selectedIconPath: '/static/tabbar/live.png',
        pagePath: 'pages/broadcast/index',
        text: '',
      },
      {
        iconType: 'local',
        iconPath: '/static/tabbar/shop_car.png',
        selectedIconPath: '/static/tabbar/shop_car_active.png',
        pagePath: 'pages/shopcar/index',
        text: '购物车',
      },
      {
        iconType: 'local',
        iconPath: '/static/tabbar/mine.png',
        selectedIconPath: '/static/tabbar/mine_active.png',
        pagePath: 'pages/user/index',
        text: '我的',
      },
    ],
  },

  // 底部菜单
  tabBar_fq: {
    color: '#D8D8D8',
    selectedColor: '#222222',
    backgroundColor: '#fff',
    borderStyle: 'white',
    height: '50px',
    fontSize: '20px',
    spacing: '0px',
    navigationBarItemSize: '22px',
    list: [
      {
        iconPath: 'static/tabbar/home.png',
        selectedIconPath: 'static/tabbar/home_active.png',
        pagePath: 'pages/index/index',
        text: '首页',
      },
      {
        iconPath: 'static/tabbar/category.png',
        selectedIconPath: 'static/tabbar/category_active.png',
        pagePath: 'pages/sort/index',
        text: '分类',
      },
      {
        iconPath: 'static/tabbar/shop_car.png',
        selectedIconPath: 'static/tabbar/shop_car_active.png',
        pagePath: 'pages/shopcar/index',
        text: '购物车',
      },
      {
        iconPath: 'static/tabbar/mine.png',
        selectedIconPath: 'static/tabbar/mine_active.png',
        pagePath: 'pages/user/index',
        text: '我的',
      },
    ],
  },
})
